package com.woniu.apartment.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.woniu.apartment.domain.PopularCity;
import com.woniu.apartment.service.IPopularCityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 首页热门房源城市Controller
 * 
 * @author yy
 * @date 2023-04-03
 */
@RestController
@RequestMapping("/apartment/tbpopularcity")
@Api("首页热门房源城市管理")
public class PopularCityWebController extends BaseController
{
    @Autowired
    private IPopularCityService popularCityService;

    /**
     * 查询首页热门房源城市列表
     */
    //@PreAuthorize("@ss.hasPermi('apartment:tbpopularcity:list')")
    @GetMapping("/web/list")
    @ApiOperation("首页热门房源城市分页查询")
    public TableDataInfo list(PopularCity popularCity)
    {
        startPage();
        List<PopularCity> list = popularCityService.selectPopularCityList(popularCity);
        return getDataTable(list);
    }


}
